package jym.tan.movielibrary.factory;

import java.awt.image.BufferedImage;
import java.io.IOException;

import javax.imageio.ImageIO;

import jym.tan.movielibrary.constant.ImageConstant;

public class ImageFactory {

	public static BufferedImage getFaviconImage() throws IOException {
		return getImage(ImageConstant.FAVICON);
	}
	
	public static BufferedImage getIMDbLogo() throws IOException {
		return getImage(ImageConstant.IMDB_LOGO);
	}
	
	public static BufferedImage getImage(String path) throws IOException {
		return ImageIO.read(ImageFactory.class.getResourceAsStream(path));
	}
}
